package com.lv.thumb.service;

import com.lv.thumb.model.dto.thumb.DoThumbRequest;
import com.lv.thumb.model.entity.Thumb;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;

/**
 *
 */
public interface ThumbService extends IService<Thumb> {


    /**
     *  点赞
     * @param doThumbRequest 点赞请求
     * @param request 请求
     * @return 点赞结果
     * @author lv
     */
    Boolean doThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);


    /**
     * 取消点赞
     * @param doThumbRequest 点赞请求
     * @param request   请求
     * @return {@link Boolean }
     * @author lv
     */
    Boolean undoThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);


    /**
     * 是否点赞
     * @param blogId   博客id
     * @param userId   用户id
     * @return {@link Boolean }
     * @author lv
     */
    Boolean hasThumb(Long blogId, Long userId);

}
